-- GENERATED SPELL FOR [Korrak the Bloodrager] --


function spell0_30023(pUnit, Event) --@Charge,n/a--
pUnit:FullCastSpellOnTarget(24193,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30023', 2307, 1)
end

function spell1_30023(pUnit, Event) --@Enrage,Self--
pUnit:FullCastSpellOnTarget(42745,pUnit)
pUnit:RegisterEvent('Sorts_30023', 12290, 1)
end

function spell2_30023(pUnit, Event) --@Grow,n/a--
pUnit:FullCastSpellOnTarget(55948,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30023', 574, 1)
end

function spell3_30023(pUnit, Event) --@Uppercut,n/a--
pUnit:FullCastSpellOnTarget(30471,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30023', 637, 1)
end

function Sorts_30023(pUnit, Event)
local choix_sorts_30023 = math.random(0, 3)
if choix_sorts_30023 == 0 then
pUnit:RegisterEvent('spell0_30023', 1, 1)
end
if choix_sorts_30023 == 1 then
pUnit:RegisterEvent('spell1_30023', 1, 1)
end
if choix_sorts_30023 == 2 then
pUnit:RegisterEvent('spell2_30023', 1, 1)
end
if choix_sorts_30023 == 3 then
pUnit:RegisterEvent('spell3_30023', 1, 1)
end
end

function mob30023_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_30023', math.random(1500, 3000), 1)
end

function mob30023_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30023_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30023_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(30023, 1, 'mob30023_Action')
RegisterUnitEvent(30023, 2, 'mob30023_Leave')
RegisterUnitEvent(30023, 3, 'mob30023_Kill')
RegisterUnitEvent(30023, 4, 'mob30023_Die')
